package com.akk.platform.oem;


import com.akk.module.app.entity.App;
import com.akk.platform.oem.business.OemAppBusiness;
import com.akk.utils.RestResponse;
import com.akk.utils.ShiroUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/platform/oem")
@Api(value = "oem-app",description = "OEM后台接口-APP")
public class OemAppAction {

    @Autowired
    OemAppBusiness oemAppBusiness;

    @RequestMapping("/appinfo")
    @ApiOperation(value = "app详情",httpMethod = "GET", response = RestResponse.class)
    public RestResponse appInfo() {
        return oemAppBusiness.appInfo(ShiroUtils.getAdmin());
    }

    @PostMapping("/appupdate")
    @ApiOperation(value = "app信息修改",httpMethod = "POST",response = RestResponse.class)
    public RestResponse appUpdte(@RequestBody App app) {
        return oemAppBusiness.appUpdate(app,ShiroUtils.getAdmin());
    }



}
